package com.sec.android.app.myfiles.facade.cmd;

import android.content.Context;

import com.sec.android.app.myfiles.util.PreferenceUtils;

import org.puremvc.java.multicore.interfaces.INotification;
import org.puremvc.java.multicore.patterns.command.SimpleCommand;

/**
 * Created by yunju.cha on 2017-04-04.
 */

public class ShowRecentFilesCmd extends SimpleCommand {
    @Override
    public void execute(INotification notification) {
        Object[] params = (Object[]) notification.getBody();

        Context context = (Context) params[0];

        boolean showRecent = PreferenceUtils.getShowRecentFiles(context);
        PreferenceUtils.setShowRecentFiles(context, !showRecent);
    }
}